package com.yike.user.vo;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.experimental.Accessors;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

/**
 * 销售报表数据信息
 *
 * @author Sakura
 * @since 2024-11-18
 */
@Data
@Accessors(chain = true)
@ApiModel(value = "销售报表数据信息")
public class SalesReportDataVo implements Serializable {
    private static final long serialVersionUID = 1L;

    @ApiModelProperty("日期")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date countDate;

    @ApiModelProperty("店铺ID")
    private String shopId;

    @ApiModelProperty("店铺名称")
    private String shopName;

    @ApiModelProperty("店铺编号")
    private String shopNo;

    @ApiModelProperty("应收金额")
    private BigDecimal totalAmount = BigDecimal.ZERO;

    @ApiModelProperty("实收金额")
    private BigDecimal actualAmount = BigDecimal.ZERO;

    @ApiModelProperty("订单量")
    private Integer orderNumber = 0;

    @ApiModelProperty("客单均价")
    private BigDecimal orderAverageAmount = BigDecimal.ZERO;

    @ApiModelProperty("微信金额")
    private BigDecimal wxAmount = BigDecimal.ZERO;

    @ApiModelProperty("支付宝金额")
    private BigDecimal aliAmount = BigDecimal.ZERO;

    @ApiModelProperty("退款数量")
    private Integer refundNumber = 0;

    @ApiModelProperty("退款金额")
    private BigDecimal refundAmount = BigDecimal.ZERO;

    @ApiModelProperty("省code")
    private String provCode;

    @ApiModelProperty("省名称")
    private String provName;

    @ApiModelProperty("市code")
    private String cityCode;

    @ApiModelProperty("市名称")
    private String cityName;

    @ApiModelProperty("区code")
    private String distCode;

    @ApiModelProperty("区名称")
    private String distName;

    @ApiModelProperty("详细地址")
    private String address;

    @ApiModelProperty("代理商ID")
    private String agentId;

    @ApiModelProperty("代理商编号")
    private String agentNo;

    @ApiModelProperty("代理商名称")
    private String agentName;

    public void setActualAmount(BigDecimal actualAmount) {
        if (actualAmount == null) {
            actualAmount = BigDecimal.ZERO;
        }
        this.actualAmount = actualAmount;
    }

    public void setRefundAmount(BigDecimal refundAmount) {
        if (refundAmount == null) {
            refundAmount = BigDecimal.ZERO;
        }
        this.refundAmount = refundAmount;
    }

}
